#!/user/bin/env python3
# -*- coding: utf-8 -*-
# author:YaFans

#有一个列表lst = [1,4,9,16,2,5,10,15]，生成一个新列表，要求新列表元素是lst相邻2项的和


lst = [1,4,9,16,2,5,10,15]


result = [lst[i]+lst[i+1] for i in range(len(lst)-1)]
print(result)

# 完成的不错
